package com.changgou.feign;

import com.changgou.entity.Result;
import com.changgou.pojo.User;
import org.springframework.cloud.openfeign.FeignClient;
<<<<<<< HEAD
import org.springframework.web.bind.annotation.*;
=======
import org.springframework.web.bind.annotation.GetMapping;
import org.springframework.web.bind.annotation.PostMapping;
import org.springframework.web.bind.annotation.RequestBody;
import org.springframework.web.bind.annotation.RequestParam;
>>>>>>> 63eb517d7b3577e68469a4e83ea0a109cd5c14bb

@FeignClient("user")
public interface UserFeign {

    /**
     * 发送短信验证码
     * @param mobile
     * @return
     */
    @GetMapping("/user/send_sms")
    public Result sendSms(@RequestParam("mobile") String mobile);

    /**
     * 用户注册
     * @param user
     * @param smsCode
     * @return
     */
    @PostMapping("/user/add")
    public Result add(@RequestBody User user,@RequestParam("smsCode")  String smsCode);

<<<<<<< HEAD
    /***
     * 根据ID查询数据
     * @param username
     * @return
     */
    @GetMapping("/user/{username}")
    public Result findById(@PathVariable("username") String username);
=======
>>>>>>> 63eb517d7b3577e68469a4e83ea0a109cd5c14bb
}
